package com.study;

import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

import java.io.IOException;

public class Test {
    public static void main(String[] args) throws IOException {
        OkHttpClient okHttpClient = new OkHttpClient();

        Request request = new Request.Builder().url("http://www.baidu.com").build();
        Response response = okHttpClient.newCall(request).execute();
        String result = response.body().string();
        System.out.println(result);

    }
}
